package com.wuqing.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author wuqing
 * @date 2020/8/8
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MethodInvokeRecord implements Serializable {
    /**
     * dubbo 接口名字
     */
    private String serviceName;
    /**
     * dubbo 方法
     */
    private String methodName;
    /**
     * 耗时
     */
    private long cost;
    /**
     * 调用发生的时间
     */
    private long recordTime;

    public static String genKey(MethodInvokeRecord record) {
        return record.getServiceName() + "_" + record.getMethodName();
    }

}